alpha, digit, space ,other= 0, 0, 0, 0
t = input("请输入一段字符：")
for i in range(len(t)):
    if t[i].isalpha():
        alpha += 1
        continue
    elif t[i].isdigit():
        digit += 1
        continue
    elif t[i].isspace():
        space += 1
        continue
    else:
        other += 1
        continue
print("英文字符个数为：{}".format(alpha))
print("数字个数为：{}".format(digit))
print("空格个数为：{}".format(space))
print("其它字符个数为：{}".format(other))